/*
 * Product.java
 *
 * Created on March 29, 2007, 1:11 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package edu.byu.isys413.samlam;

import java.util.LinkedList;
import java.util.List;

/**
 * Product
 * @author Brian Barrett
 * This class is an abstract class and is inherited by Physical Product and Conceptual ProductDAO
 */
public abstract class Product extends BusinessObject 
{
      protected String type = null; 
      protected double price = 0;
      protected List<Sale> sales = new LinkedList();  
   
    
    /**
     * Creates a new instance of Product
     * @param id id
     */
   public Product(String id) {
        super(id);
   }
    
   /*This method gets the id for the product object
    *returns id
    *
    */ 
    /**
     * get id
     * @return return getID
     */

    /*This method returns price of the the product.
     *@return price
     */
    /**
     * get price
     * @return get price
     */
    public double getPrice() {
        return price;
        
    }

    /*
     * @param price 
     *This method sets the price for the product.
     */
    /**
     * set price
     * @param price price
     */
    public void setPrice(double price) {
        this.price = price;
        this.setDirty(true);
    }

    /**
     * get sales
     * @return get sales
     */
    public List<Sale> getSales() {
        return sales;
    }

    /**
     * set sales
     * @param sales set sales
     */
    public void setSales(List<Sale> sales) {
        this.sales = sales;
    }
    
}
